/* vue */
import { useStorage } from '@vueuse/core'
/* util */
import { getUserId } from '@src/util/storage.ts'
import { Ref } from 'vue'

const userId = getUserId()

// @ts-ignore
function useShbStorage<T>(key: string, defaultValue: T): Ref<T> {
  // @ts-ignore
  return useStorage(`${userId}-${key}`, defaultValue)
}

export default useShbStorage
